home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5991 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  43 lines

  1. Path: news.massey.ac.nz!sysadmin    
  2. From: Nigel.Ramsay.1@massey.ac.nz
  3. Newsgroups: comp.lang.c++
  4. Subject: Problems calling library functions from C++ (c is OK)
  5. Date: Thu, 08 Feb 1996 10:25:56 +1200
  6. Organization: Massey University
  7. Message-ID: <311926F4.7EFB@uni.massey.ac.nz>
  8. NNTP-Posting-Host: pt-pc40.massey.ac.nz
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
  13.  
  14. Hi,
  15.  
  16. I am having difficulty calling functions that are in an external 
  17. library. 
  18.  
  19. When I stick to plain C code (using a .c extension), I can access the 
  20. functions, but when I rename my files to extension .cpp, I get the 
  21. following error:
  22.  
  23. COMSTEST.OBJ(c:\dev\src\comstest.cpp) : error L2029: 'void __near 
  24. __cdecl set_robot_on(int,int,int __near*)' : unresolved external
  25.  
  26. I have tried adding...
  27.  
  28. extern "C" { 
  29. .
  30. .
  31. .
  32. }
  33.  
  34. to the header file of the library, but still no luck.
  35.  
  36. Can someone please suggest how I might solve this problem.
  37.  
  38. Any help would be much appreciated.
  39.  
  40. Thanks,
  41.  
  42. Nigel Ramsay.
  43.